/*
 * TextCoverFlowNode.fx
 *
 * Created on Apr 19, 2010, 2:54:22 PM
 */

package fxgreader.components;

import javafx.scene.text.Text;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;

/**
 * @author perkintang
 */

public class TextCoverFlowNode extends CoverFlowNode{
public var content : String;
var text : Text = Text {
    x: 0
    y : 0
//    font: Font { size: 15 }
    content: bind content
    fill: Color.WHITE
    wrappingWidth: bind ori_width - 20
    translateX : bind ori_width/2 - text.boundsInLocal.width/2;
    translateY : bind ori_height/2 - text.boundsInLocal.height/2 - text.layoutBounds.minY;
}
override public function load(){
     println("ori_height = {ori_height}");
     group.content = [background];
     insert text into group.content;
     println("text translateY : {text.translateY}");
     println("text layoutbounds miny : {text.layoutBounds.minY}");
}
override public function release(){
     delete text from group.content;
}
}
